<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>CUbooks</title>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<meta http-equiv="Content-Language" content="en-us" />
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/public/css/screen.css"/>" />
	<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/public/css/jquery.validate.password.css" />" />	
	<style type="text/css">
	@import "<c:url value="/public/css/jquery.countdown.css"/>";
	#defaultCountdown { width: 240px; height: 45px; }
	</style>
</head>
<body class="onecolumn">
<div id="skipnav">
	<a href="#content">Skip to main content</a>
</div>

<hr />
<!-- The header div contains the main identity and main navigation for the site -->
<div id="header">	
	<div id="identity">

		<h1>CUBOOKS AUCTION SERVICE</h1>
		<sec:authorize ifAnyGranted="ROLE_BUYER,ROLE_BUYER">
			<h2>Welcome: <strong><sec:authentication property="principal.firstName"/></strong>. You are authorized as
		</sec:authorize> 
		<sec:authorize ifAllGranted="ROLE_BUYER">a buyer</sec:authorize><sec:authorize ifAllGranted="ROLE_SELLER"> and seller</sec:authorize><sec:authorize ifAnyGranted="ROLE_BUYER,ROLE_BUYER">.</h2></sec:authorize>
	</div>
		
	<hr />
	<div id="navigation">
		<ul>
			<li><a href="<c:url value="/postings/"/>">Home</a></li>
			<sec:authorize ifAnyGranted="ROLE_ADMIN">
				<li><a href="<c:url value="/user/"/>">Users</a></li>
			</sec:authorize>
			<sec:authorize ifAnyGranted="ROLE_SELLER,ROLE_BUYER">
				<li><a href="<c:url value="/user/home.html"/>">My CUBooks</a></li>
				<li><a href="<c:url value="/user/edit/${currentUser.id}/"/>">Edit My Account</a></li>	
			</sec:authorize>
			<sec:authorize ifNotGranted="ROLE_BUYER,ROLE_SELLER,ROLE_ADMIN">
				<li><a href="<c:url value="/login.jsp"/>">Login</a></li>	
			</sec:authorize>
			<sec:authorize ifAllGranted="ROLE_BUYER"> 
				<sec:authorize ifNotGranted="ROLE_SELLER">
				<c:if test="${currentUser.requestSeller != 1}">
					<li><a href="<c:url value="/user/request-seller.html"/>">Request Seller Account</a></li>
				</c:if>
				</sec:authorize>
			</sec:authorize>
			<sec:authorize ifAnyGranted="ROLE_BUYER,ROLE_SELLER,ROLE_ADMIN">
				<li><a href="<c:url value="/j_spring_security_logout"/>">Log Out</a></li>	
			</sec:authorize>
			<sec:authorize ifNotGranted="ROLE_BUYER,ROLE_SELLER,ROLE_ADMIN">
				<li><a href="<c:url value="/user/add/"/>">Register</a></li>	
			</sec:authorize>
		</ul>
	</div>
</div>
<hr />
<div id="wrap">
	<div id="content">
		<div id="main">

